﻿@model Model.major_change
@{
    ViewData["Title"] = "register_list";
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="../../css/table.css"
          type="text/css" />
    <STYLE type="text/css">
    </STYLE>
    <script src="~/jquery.js"></script>
    <script src="~/vue.js"></script>
</head>
<body >
    <div id="app">
        <form action="/HR_Fist/transfer/transferAction!findPage" method="post">
            <font color="black"> 您在做的业务是-人力资源-调动管理-调动登记列表 </font>
            <br /><br /><br />

            <table width="100%" border="1" cellpadding=0 cellspacing=1
                   bordercolorlight=#848284 bordercolordark=#eeeeee
                   class="TABLE_STYLE1">
                <tr height="21">
                    <td hidden="hidden">
                        <input asp-for="first_kind_id" class="form-control" id="first_kind_id"/>
                        <span asp-validation-for="first_kind_id" class="text-danger"></span>
                    </td>
                    <td hidden="hidden">
                        <input asp-for="second_kind_id" class="form-control" id="second_kind_id"/>
                        <span asp-validation-for="second_kind_id" class="text-danger"></span>
                    </td>
                    <td hidden="hidden">
                        <input asp-for="third_kind_id" class="form-control" id="third_kind_id"/>
                        <span asp-validation-for="third_kind_id" class="text-danger"></span>
                    </td>
                    <td width="19%" class="TD_STYLE1">
                        I级机构
                    </td>
                    <td width="19%" class="TD_STYLE1">
                        II级机构
                    </td>
                    <td width="19%" class="TD_STYLE1">
                        Ⅲ级机构
                    </td>
                    <td width="19%" class="TD_STYLE1">
                        薪酬标准
                    </td>
                    <td width="19%" class="TD_STYLE1">
                        名字
                    </td>
                    <td width="5%" class="TD_STYLE1">
                        调动
                    </td>
                </tr>
                <tr v-for="item in dt" :key="item.mch_id">
                    <td class="TD_STYLE2">{{item.first_kind_name}}</td>
                    <td class="TD_STYLE2">{{item.second_kind_name}}</td>
                    <td class="TD_STYLE2">{{item.third_kind_name}}</td>
                    <td class="TD_STYLE2">{{item.salary_standard_name}}</td>
                    <td class="TD_STYLE2">{{item.human_name}}</td>
                    <td class="TD_STYLE2">
                        <a :href="'/transfer/register/'+[item.mch_id]">调动</a>
                    </td>
                </tr>
            </table>
            <div align="center" style="font-size: 18px;color: gray">
                &nbsp;&nbsp;总数：
                <font style="color: maroon;font-weight: bold;">{{rows}}</font>
                例
                &nbsp;&nbsp;&nbsp;
                每页显示 <font style="color: maroon;font-weight: bold;">{{pageSize}}</font>
                条
                &nbsp;&nbsp;&nbsp;
                当前第 <font style="color: maroon;font-weight: bold;">{{currentPage}}</font>
                页
                &nbsp;&nbsp;&nbsp;共
                <font style="color: maroon;font-weight: bold;">{{pages}}</font>
                页
                <a style="color: navy;font-weight: bold" v-on:click="first()">首页</a>

                <a style="color: navy;font-weight: bold"
                   v-on:click="prev()">上一页</a>

                <a style="color: navy;font-weight: bold"
                   v-on:click="next()">下一页</a>

                <a style="color: navy;font-weight: bold"
                   v-on:click="last()">末页</a>
                &nbsp;&nbsp;&nbsp;跳到第
                <input id=page type=text v-model="tpage" class=input1 size=1>
                页&nbsp;&nbsp;
                <input type="image" v-on:click="tiao()" src="~/images/go.bmp" width=18 height=18 border=0>
            </div>
        </form>
    </div>
        <script type="text/javascript">
            var vm = new Vue({
                el: "#app",
                data: {
                    dt: [],
                    rows: 0,
                    pages: 0,
                    currentPage: 1,
                    pageSize: 1,
                    tpage: 1
                },
                methods: {
                    load: function () {
                        var t = this;
                        $.ajax({
                            url: "/transfer/Fy?id=" + t.currentPage,
                            type: "get",
                            success: function (msg) {
                                var d = eval(msg);
                                t.dt = d["list"];
                                t.rows = d["rows"];
                                t.pages = d["pages"];
                            }
                        });
                    },
                    //首页
                    first: function () {
                        this.currentPage = 1;
                        this.load();
                    },
                    //下一页
                    next: function () {
                        if (this.currentPage < this.pages) {
                            this.currentPage++;
                        } else {
                            this.currentPage = this.pages;
                        }
                       
                        this.load();
                    },
                    //上一页
                    prev: function () {
                        if (this.currentPage > 1) {
                            this.currentPage--;
                        } else {
                            this.currentPage = 1;
                        }
                        this.load();

                    },
                    //尾页
                    last: function () {
                        this.currentPage = this.pages;
                        this.load();
                    },
                    //跳转
                    tiao: function () {
                        var tiaoA = $("#page").val();
                        if (tiaoA > 0 && tiaoA <= this.pages) {
                            this.currentPage = tiaoA;
                        } else {
                            alert("不好意思，该页面不存在(自动跳首页)");
                            this.currentPage = 1;
                        }
                        var t = this;
                        $.ajax({
                            url: "/transfer/Fy?id=" + t.currentPage,
                            type: "get",
                            success: function (msg) {

                                var d = eval(msg);
                                t.dt = d["list"];
                                t.rows = d["rows"];
                                t.pages = d["pages"];
                            }
                        });
                    },
                },
                mounted: function () {
                    var t = this;
                    var a = $("#first_kind_id").val();
                    var b = $("#second_kind_id").val();
                    var c = $("#third_kind_id").val();
                    $.ajax({
                        url: "/transfer/Fy?id=" + t.currentPage + "&a=" + a + "&b=" + b + "&c=" + c,
                        type: "get",
                        success: function (msg) {
                            var d = eval(msg);
                            t.dt = d["list"];
                            t.rows = d["rows"];
                            t.pages = d["pages"];
                        }
                    });
                  
                }
                
            });
        </script>
    
</body>

</html >
